package com.sikaryofficial.backend.domain.dto.req.information;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.sikaryofficial.backend.annotation.SensitiveDeserializer;
import com.sikaryofficial.system.api.model.att.AttachmentResp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 文章评价请求对象
 * 
 * @author qinjinyuan
 * @date 2024-03-15
 */
@Getter
@Setter
@ToString
@ApiModel(value = "文章评价请求入参", description = "文章评价请求入参")
public class ArticleEvaluateReq
{
    /** 文章评价ID */
    @JsonIgnore
    private Long articleEvaluateId;

    /** 文章ID */
    @ApiModelProperty(value = "文章ID", example = "1")
    @NotNull(message = "the articleId is null")
    @Min(value = 0, message = "articleId could not less than 0")
    private Long articleId;

    /** 评价内容 */
    @ApiModelProperty(value = "评价内容", example = "评价内容")
    @Length(min = 1, max = 1000, message = "evaluateContent length must between 1 and 1000")
    @JsonDeserialize(using = SensitiveDeserializer.class)
    private String evaluateContent;

    @ApiModelProperty(value = "是否通过指引任务触发", example = "true, 默认为:false")
    private Boolean hasGuideTask;

    @ApiModelProperty(value = "附件列表")
    private List<AttachmentResp> attachmentList;
}
